package xyz.ddlnt.serviceusrclient.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import xyz.ddlnt.commonutil.result.Result;
import xyz.ddlnt.model.dto.PageDTO;
import xyz.ddlnt.model.dto.UserContentInteractionDTO;
import xyz.ddlnt.model.entity.PrivateMessageList;
import xyz.ddlnt.model.vo.PrivateMessageListVO;

import java.util.List;

/**
 * @author ZZULI_SE 210910
 * @data 2025/5/26 16:52
 */
//@FeignClient(name = "service-usr", url = "http://yixuewang-service-usr:9015", path = "/private_message_list")
//@FeignClient(name = "service-usr", url = "http://localhost:9005", path = "/private_message_list")
@FeignClient(value = "service-usr", path = "/private_message_list")
public interface PrivateMessageListFeignClient {

    /**
     * 判断(并插入)私信列表
     * @param userContentInteractionDTO
     * @return
     */
    @PostMapping("/judgeAndInsertPrivateMessageList")
    Result<Integer> JudgeAndInsertPrivateMessageList(@RequestBody UserContentInteractionDTO userContentInteractionDTO);

    /**
     * 获取私信列表
     * @param pageDTO
     * @return
     */
    @PostMapping("/listPrivateMessageList")
    Result<List<PrivateMessageListVO>> listPrivateMessageList(@RequestBody PageDTO pageDTO);

    /**
     * 删除私信
     * @param userContentInteractionDTO
     * @return
     */
    @DeleteMapping("/deletePrivateMessage")
    Result<Boolean> deletePrivateMessage(@RequestBody UserContentInteractionDTO userContentInteractionDTO);

}
